package com.topcheer.demonacos.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xutao
 * @Package com.topcheer.demonacos
 * @Description: ${todo}
 * @date 2020/1/10 10:27
 */
@RestController
@RefreshScope
public class HelloController {

    @Value("${hello.msg}")
    private String msg;

    /**
     * http://localhost:8080/config/get
     */
    @RequestMapping("/get")
    public String get() {
        return msg;
    }
}
